import React, {Component} from 'react';

import './index.less';

import {
    base
} from 'nc-lightapp-front';

const {
    NCButton
} = base;

export default class AddPageHeader extends Component {
    constructor(props) {
        super(props);
    }

    render() {
        const {
            status,
            onClick,
            button,
            language,
            cancelEdit,
            workflow_state,
            ...other
        } = this.props;

        return (
            <div className="add-page-header-wrapper" {...other}>
                {/*status指待入职页面的编辑状态*/}
                {(status === 'browse') && (workflow_state === '7') && <NCButton
                    colors="accent"
                    onClick={onClick('editA')}
                >
                    {language['gx6008-000215']/** 编辑 */}
                </NCButton>}
                {button.createButtonApp({
                    area: 'head',
                    onButtonClick: onClick('unentry_status')
                })}
            </div>
        );
    }
}